package com.example.demo.demos.web.service.impl;

import com.example.demo.demos.web.domain.Classmate;
import com.example.demo.demos.web.mapper.ClassmateMapper;
import com.example.demo.demos.web.service.ClassmateService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service
public class ClassmateServiceImpl implements ClassmateService {
    @Resource
    private ClassmateMapper classmateMapper;

    @Override
    public int addClassmate(Classmate classmate) {
        return classmateMapper.insertClassmate(classmate);
    }

    @Override
    public int deleteClassmateByXuehao(int xuehao) {
        return classmateMapper.deleteClassmateByXuehao(xuehao);
    }

    @Override
    public int updateClassmate(Classmate classmate) {
        return classmateMapper.updateClassmate(classmate);
    }

    @Override
    public Classmate getClassmateByXuehao(int xuehao) {
        return classmateMapper.selectClassmateByXuehao(xuehao);
    }
}